import { Toast } from 'antd-mobile'

// 成功消息提示
export const success = (content: string, callback?: () => void) => {
  Toast.show({
    icon: 'success',
    duration: 1000,
    content,
    afterClose: callback && callback()!,
  })
}
// 失败的消息提示
export const error = (content: string, callback?: () => void) => {
  Toast.show({
    duration: 2000,
    content,
    afterClose: callback && callback()!,
  })
}
